package com.yan.movie.domain;

/**
 * @author taoge
 * @Date 2024/8/1 16:59
 * @Description
 */
public class Movie {
    private String name;
    private String type;

    public Movie(String name, String type) {
        this.name = name;
        this.type = type;
    }

    public Movie() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Movie movie = (Movie) o;

        if (name != null ? !name.equals(movie.name) : movie.name != null) return false;
        return type != null ? type.equals(movie.type) : movie.type == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return
             "电影名称:" + name + "\n" +
             "电影类型:" + type + "\n";
    }
}
